package logic

import (
	"context"
	"wechat/models/mysql"

	"wechat/wechatrpc/internal/svc"
	"wechat/wechatrpc/wechatrpc"

	"github.com/zeromicro/go-zero/core/logx"
)

type CircleDelLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
}

func NewCircleDelLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CircleDelLogic {
	return &CircleDelLogic{
		ctx:    ctx,
		svcCtx: svcCtx,
		Logger: logx.WithContext(ctx),
	}
}

func (l *CircleDelLogic) CircleDel(in *wechatrpc.CircleDelRequest) (*wechatrpc.CircleDelResponse, error) {
	// todo: add your logic here and delete this line
	var dd mysql.Circle
	mysql.DB.Where("id=?", in.Id).Delete(&dd)
	return &wechatrpc.CircleDelResponse{}, nil
}
